from django.contrib.auth.models import User
from django.db import models

GENDER = [
    (0, '未知'),
    (1, '男'),
    (2, '女')
]


class WechatUserInfo(models.Model):
    openid = models.CharField(max_length=64, unique=True)
    avatar_url = models.URLField()
    city = models.CharField(max_length=16)
    country = models.CharField(max_length=16)
    gender = models.SmallIntegerField(default=0, choices=GENDER)
    language = models.CharField(max_length=16)
    nick_name = models.CharField(max_length=64)
    province = models.CharField(max_length=16)

    class Meta:
        verbose_name = u'微信用户'
        verbose_name_plural = u'微信用户'
